package com.mingdong.first.guanchazhe;

import com.mingdong.first.guanchazhe.observer.CurrentConditions;
import com.mingdong.first.guanchazhe.observer.ForcastConditions;
import com.mingdong.first.guanchazhe.observer.NextMothConditions;
import com.mingdong.first.guanchazhe.subject.WeatherData;

public class Test {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		WeatherData weatherData = new WeatherData();
		CurrentConditions current = new CurrentConditions();
		ForcastConditions forcast = new ForcastConditions();
		NextMothConditions nextMoth = new NextMothConditions();
		
		weatherData.registerObserver(current);
		weatherData.registerObserver(forcast);
		weatherData.registerObserver(nextMoth);
		weatherData.setData(30, 31, 32);
		
		weatherData.removeObserver(current);
		
		weatherData.setData(40, 41, 42);
	}

}
